/*----------------------------------------------------
 * include
 ----------------------------------------------------*/
#include "RbTree.h"

 /*----------------------------------------------------
  * Macro
  ----------------------------------------------------*/
#define VERSION "1.1.0"

/*----------------------------------------------------
 * main
 ----------------------------------------------------*/
int main()
{
	std::cout << "version(rb-tree):" << VERSION << std::endl;
	RbTree<int> *rb_tree = new RbTree<int>;
	//int arr[] = { 33, 13, 95, 1, 55, 47, 19, 23, 11, 18, 20, 123};
	int arr[] = { 24,25,13,35,23, 26,67,47,38,98, 20,19,17,49,12, 21,9,18,14,15 };
	for (int i = 0; i < sizeof(arr) / sizeof(int); i++)
	{
		rb_tree->rbtree_insert_value(arr[i]);
	}
	rb_tree->rbtree_inorder();


	for (int i = 0; i < sizeof(arr) / sizeof(int); i++)
	{
		std::cout << std::endl;
		std::cout << "-----------delete(" << arr[i] << ")-------------" << std::endl;
		rb_tree->rbtree_delete_value(arr[i]);
		rb_tree->rbtree_inorder();
	}

	delete rb_tree;
	return 0;
}